{extends file="./main.tpl"}
{block name=head}
<link href="css/user.css" rel="stylesheet" type="text/css" />
<script src="./js/jquery.min.js">
</script>
<script type="text/javascript">
$(document).ready(function() 
{
  $(".add").blur(function()
  {     
	  if($(".add:last").val() != '' && $(".add:last").val()!= '')
    {
      $("#one").clone(true).appendTo("#mainDiv")
      .find('input[type="text"]').val('').end()
      .find('select[option=""]').val('');
    }
  });
});
</script>
{/block}
{block name="body"}
<form action="{$smarty.server.PHP_SELF}" method="POST" class="register"> 
<table align="center">
<h1 align="center" style="font-size:px; color:#5BA7E9;">Item</h1>
  <tbody id="mainDiv">
  	<th>Item</th>
  	<th>Price</th>
    <tr id="one">
      <td><input type="text" name="itemName[]" class="add text-field" AUTOFOCUS></td>
      <td><input type="text" name="itemPrice[]" class="text-field"></td>
    </tr>
  </tbody>
  <tr>
    <td colspan="4" align="center"><input type="submit" name="submit" value="Submit" class="button"></td>
  </tr>
</table>
</form>
{/block}
